3.5 \(\int \frac{(A+B x) \sqrt{a+b x^2}}{x} \, dx\)

Optimal. Leaf size=79 \[ \frac{1}{2} \sqrt{a+b x^2} (2 A+B x)-\sqrt{a} A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )+\frac{a B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 \sqrt{b}} \]

[Out]

((2*A + B*x)*Sqrt[a + b*x^2])/2 + (a*B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/(2*Sqrt[b]) - Sqrt[a]*A*ArcTanh[S
qrt[a + b*x^2]/Sqrt[a]]

________________________________________________________________________________________

Rubi [A]  time = 0.0605239, antiderivative size = 79, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.35, Rules used = {815, 844, 217, 206, 266, 63, 208} \[ \frac{1}{2} \sqrt{a+b x^2} (2 A+B x)-\sqrt{a} A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )+\frac{a B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 \sqrt{b}} \]

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*Sqrt[a + b*x^2])/x,x]

[Out]

((2*A + B*x)*Sqrt[a + b*x^2])/2 + (a*B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/(2*Sqrt[b]) - Sqrt[a]*A*ArcTanh[S
qrt[a + b*x^2]/Sqrt[a]]

Rule 815

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[((d + e*x)^(
m + 1)*(c*e*f*(m + 2*p + 2) - g*c*d*(2*p + 1) + g*c*e*(m + 2*p + 1)*x)*(a + c*x^2)^p)/(c*e^2*(m + 2*p + 1)*(m
+ 2*p + 2)), x] + Dist[(2*p)/(c*e^2*(m + 2*p + 1)*(m + 2*p + 2)), Int[(d + e*x)^m*(a + c*x^2)^(p - 1)*Simp[f*a
*c*e^2*(m + 2*p + 2) + a*c*d*e*g*m - (c^2*f*d*e*(m + 2*p + 2) - g*(c^2*d^2*(2*p + 1) + a*c*e^2*(m + 2*p + 1)))
*x, x], x], x] /; FreeQ[{a, c, d, e, f, g, m}, x] && NeQ[c*d^2 + a*e^2, 0] && GtQ[p, 0] && (IntegerQ[p] ||  !R
ationalQ[m] || (GeQ[m, -1] && LtQ[m, 0])) &&  !ILtQ[m + 2*p, 0] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*
m, 2*p])

Rule 844

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dist[g/e, Int[(d
+ e*x)^(m + 1)*(a + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + c*x^2)^p, x], x] /; FreeQ[{a,
c, d, e, f, g, m, p}, x] && NeQ[c*d^2 + a*e^2, 0] &&  !IGtQ[m, 0]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{(A+B x) \sqrt{a+b x^2}}{x} \, dx &=\frac{1}{2} (2 A+B x) \sqrt{a+b x^2}+\frac{\int \frac{2 a A b+a b B x}{x \sqrt{a+b x^2}} \, dx}{2 b}\\ &=\frac{1}{2} (2 A+B x) \sqrt{a+b x^2}+(a A) \int \frac{1}{x \sqrt{a+b x^2}} \, dx+\frac{1}{2} (a B) \int \frac{1}{\sqrt{a+b x^2}} \, dx\\ &=\frac{1}{2} (2 A+B x) \sqrt{a+b x^2}+\frac{1}{2} (a A) \operatorname{Subst}\left (\int \frac{1}{x \sqrt{a+b x}} \, dx,x,x^2\right )+\frac{1}{2} (a B) \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{x}{\sqrt{a+b x^2}}\right )\\ &=\frac{1}{2} (2 A+B x) \sqrt{a+b x^2}+\frac{a B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 \sqrt{b}}+\frac{(a A) \operatorname{Subst}\left (\int \frac{1}{-\frac{a}{b}+\frac{x^2}{b}} \, dx,x,\sqrt{a+b x^2}\right )}{b}\\ &=\frac{1}{2} (2 A+B x) \sqrt{a+b x^2}+\frac{a B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 \sqrt{b}}-\sqrt{a} A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )\\ \end{align*}

Mathematica [A]  time = 0.208145, size = 100, normalized size = 1.27 \[ \frac{1}{2} \left (\frac{a^{3/2} B \sqrt{\frac{b x^2}{a}+1} \sinh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{\sqrt{b} \sqrt{a+b x^2}}+\sqrt{a+b x^2} (2 A+B x)-2 \sqrt{a} A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*Sqrt[a + b*x^2])/x,x]

[Out]

((2*A + B*x)*Sqrt[a + b*x^2] + (a^(3/2)*B*Sqrt[1 + (b*x^2)/a]*ArcSinh[(Sqrt[b]*x)/Sqrt[a]])/(Sqrt[b]*Sqrt[a +
b*x^2]) - 2*Sqrt[a]*A*ArcTanh[Sqrt[a + b*x^2]/Sqrt[a]])/2

________________________________________________________________________________________

Maple [A]  time = 0.004, size = 78, normalized size = 1. \begin{align*}{\frac{Bx}{2}\sqrt{b{x}^{2}+a}}+{\frac{Ba}{2}\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ){\frac{1}{\sqrt{b}}}}-A\sqrt{a}\ln \left ({\frac{1}{x} \left ( 2\,a+2\,\sqrt{a}\sqrt{b{x}^{2}+a} \right ) } \right ) +A\sqrt{b{x}^{2}+a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(b*x^2+a)^(1/2)/x,x)

[Out]

1/2*x*B*(b*x^2+a)^(1/2)+1/2*B*a/b^(1/2)*ln(x*b^(1/2)+(b*x^2+a)^(1/2))-A*a^(1/2)*ln((2*a+2*a^(1/2)*(b*x^2+a)^(1
/2))/x)+A*(b*x^2+a)^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b*x^2+a)^(1/2)/x,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.66101, size = 859, normalized size = 10.87 \begin{align*} \left [\frac{B a \sqrt{b} \log \left (-2 \, b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{b} x - a\right ) + 2 \, A \sqrt{a} b \log \left (-\frac{b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{a} + 2 \, a}{x^{2}}\right ) + 2 \,{\left (B b x + 2 \, A b\right )} \sqrt{b x^{2} + a}}{4 \, b}, -\frac{B a \sqrt{-b} \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) - A \sqrt{a} b \log \left (-\frac{b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{a} + 2 \, a}{x^{2}}\right ) -{\left (B b x + 2 \, A b\right )} \sqrt{b x^{2} + a}}{2 \, b}, \frac{4 \, A \sqrt{-a} b \arctan \left (\frac{\sqrt{-a}}{\sqrt{b x^{2} + a}}\right ) + B a \sqrt{b} \log \left (-2 \, b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{b} x - a\right ) + 2 \,{\left (B b x + 2 \, A b\right )} \sqrt{b x^{2} + a}}{4 \, b}, -\frac{B a \sqrt{-b} \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) - 2 \, A \sqrt{-a} b \arctan \left (\frac{\sqrt{-a}}{\sqrt{b x^{2} + a}}\right ) -{\left (B b x + 2 \, A b\right )} \sqrt{b x^{2} + a}}{2 \, b}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b*x^2+a)^(1/2)/x,x, algorithm="fricas")

[Out]

[1/4*(B*a*sqrt(b)*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) + 2*A*sqrt(a)*b*log(-(b*x^2 - 2*sqrt(b*x^2 +
 a)*sqrt(a) + 2*a)/x^2) + 2*(B*b*x + 2*A*b)*sqrt(b*x^2 + a))/b, -1/2*(B*a*sqrt(-b)*arctan(sqrt(-b)*x/sqrt(b*x^
2 + a)) - A*sqrt(a)*b*log(-(b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(a) + 2*a)/x^2) - (B*b*x + 2*A*b)*sqrt(b*x^2 + a))/b
, 1/4*(4*A*sqrt(-a)*b*arctan(sqrt(-a)/sqrt(b*x^2 + a)) + B*a*sqrt(b)*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*
x - a) + 2*(B*b*x + 2*A*b)*sqrt(b*x^2 + a))/b, -1/2*(B*a*sqrt(-b)*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - 2*A*sqr
t(-a)*b*arctan(sqrt(-a)/sqrt(b*x^2 + a)) - (B*b*x + 2*A*b)*sqrt(b*x^2 + a))/b]

________________________________________________________________________________________

Sympy [A]  time = 5.04436, size = 107, normalized size = 1.35 \begin{align*} - A \sqrt{a} \operatorname{asinh}{\left (\frac{\sqrt{a}}{\sqrt{b} x} \right )} + \frac{A a}{\sqrt{b} x \sqrt{\frac{a}{b x^{2}} + 1}} + \frac{A \sqrt{b} x}{\sqrt{\frac{a}{b x^{2}} + 1}} + \frac{B \sqrt{a} x \sqrt{1 + \frac{b x^{2}}{a}}}{2} + \frac{B a \operatorname{asinh}{\left (\frac{\sqrt{b} x}{\sqrt{a}} \right )}}{2 \sqrt{b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b*x**2+a)**(1/2)/x,x)

[Out]

-A*sqrt(a)*asinh(sqrt(a)/(sqrt(b)*x)) + A*a/(sqrt(b)*x*sqrt(a/(b*x**2) + 1)) + A*sqrt(b)*x/sqrt(a/(b*x**2) + 1
) + B*sqrt(a)*x*sqrt(1 + b*x**2/a)/2 + B*a*asinh(sqrt(b)*x/sqrt(a))/(2*sqrt(b))

________________________________________________________________________________________

Giac [A]  time = 1.19014, size = 105, normalized size = 1.33 \begin{align*} \frac{2 \, A a \arctan \left (-\frac{\sqrt{b} x - \sqrt{b x^{2} + a}}{\sqrt{-a}}\right )}{\sqrt{-a}} - \frac{B a \log \left ({\left | -\sqrt{b} x + \sqrt{b x^{2} + a} \right |}\right )}{2 \, \sqrt{b}} + \frac{1}{2} \, \sqrt{b x^{2} + a}{\left (B x + 2 \, A\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b*x^2+a)^(1/2)/x,x, algorithm="giac")

[Out]

2*A*a*arctan(-(sqrt(b)*x - sqrt(b*x^2 + a))/sqrt(-a))/sqrt(-a) - 1/2*B*a*log(abs(-sqrt(b)*x + sqrt(b*x^2 + a))
)/sqrt(b) + 1/2*sqrt(b*x^2 + a)*(B*x + 2*A)